package com.bwie.common.controlleradvice;

import com.bwie.common.exception.GlobException;
import com.bwie.common.result.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


@RestControllerAdvice
public class GlobControllerAdvice  {

    @ExceptionHandler(value = GlobException.class)
    public Result error(GlobException e){
        return Result.error(e.getMessage());
    }
}
